	<?php $this->jQuery()->onLoadCaptureStart(); ?>
				jQuery('#active').change(function() 
				{ 
					$.post('/itemlisting/changeindex/active/'+$('#active').val(),{}, 
					function(data) {
						
						htmlCode = "";
						
						for (key in data) {
							htmlCode = htmlCode+"<tr><td>"+data[key]['inventoryItem']+"</td> \
												<td>"+data[key]['pricelistDesc']+"</td> \
												<td>"+data[key]['platform']+"</td> \
												<td>"+data[key]['skylandersWave']+"</td> \
												<td>"+data[key]['releaseDate']+"</td> \
												<td>"+data[key]['hek']+" &euro;</td> \
												<td>"+data[key]['hekCH']+" &euro;</td> \
												<td>"+data[key]['srp']+" &euro;</td> \
												<td>"+data[key]['uskRating']+"</td> \
												<td>"+data[key]['pegiRating']+"</td> \
												<td>"+data[key]['active']+"</td> \
												<td><a href=\"/itemlisting/edit/id/"+data[key]['id']+"\">Edit</a></td></tr>";
						}
						
						$('#dynamicTable').html(htmlCode);
					}, 'json');
				});
				
				jQuery('#inventoryItem').change(function() 
				{ 
					$.post('/itemlisting/changeindex/sku/'+$('#inventoryItem').val(),{}, 
					function(data) {
						
						htmlCode = "";
						
						for (key in data) {
							htmlCode = htmlCode+"<tr><td>"+data[key]['inventoryItem']+"</td> \
												<td>"+data[key]['pricelistDesc']+"</td> \
												<td>"+data[key]['platform']+"</td> \
												<td>"+data[key]['skylandersWave']+"</td> \
												<td>"+data[key]['releaseDate']+"</td> \
												<td>"+data[key]['hek']+" &euro;</td> \
												<td>"+data[key]['hekCH']+" &euro;</td> \
												<td>"+data[key]['srp']+" &euro;</td> \
												<td>"+data[key]['uskRating']+"</td> \
												<td>"+data[key]['pegiRating']+"</td> \
												<td>"+data[key]['active']+"</td> \
												<td><a href=\"/itemlisting/edit/id/"+data[key]['id']+"\">Edit</a></td></tr>";
						}
						
						$('#dynamicTable').html(htmlCode);
					}, 'json');
				});
				
									
				
				
	<?php $this->jQuery()->onLoadCaptureEnd(); ?>

<div id="content">
	<h1>
		<?php echo $this->pageTitle; ?>
	</h1>
	<p>
		<?php echo '<a href='.$this->url(array('controller' => 'itemlisting', 'action'     => 'add')).'>Add new item</a>' ?>
	</p>
	<p>Filter:
	<p> Active:
		<select name="active" id="active">
		    <option value="N">Non-Active</option>
		    <option value="Y">Active</option>
		</select>
		SKU:
		<input type="text" id="inventoryItem" name="inventoryItem" size="10">
	
<div id="normaltable">
	<table>
		<thead>
			<tr>
				<th>SKU</th>
				<th>PricelisteDesc</th>
				<th>Platform</th>
				<th>Wave</th>
				<th>Release Date</th>
				<th>HEK</th>
				<th>HEK CH</th>
				<th>SRP</th>
				<th>USK Rating</th>
				<th>PEGI Rating</th>
				<th>Active</th>
				<th></th>
			</tr>
		</thead>
		<tbody id="dynamicTable">
			<?php 

			foreach($this->entries as $row) {
				
				echo '<tr >';				
	
					echo '<td>'.$row['inventoryItem'].'</td>
						  	<td>'.$row['pricelistDesc'].'</td>
							<td>'.$row['platform'].'</td>
							<td>'.$row['skylandersWave'].'</td>
						  	<td>'.$row['releaseDate'].'</td>
						  	<td>'.$row['hek'].' &euro;</td>
							<td>'.$row['hekCH'].' &euro;</td>
							<td>'.$row['srp'].' &euro;</td>
							<td>'.$row['uskRating'].'</td>
							<td>'.$row['pegiRating'].'</td>
							<td>'.$row['active'].'</td>';
			
					echo '<td><a href='.$this->url(array(
							'id'	=> $row['id'],
							'controller' => 'itemlisting',
							'action'     => 'edit')).'>Edit<a></td>';
				
				echo '</tr>';
			}

			?>
		</tbody>
	</table>
</div>
</div>